﻿@using MvcPaging
@model IPagedList<MvcApplication5.Models.News>
@{
	ViewBag.Title = "Browse all products";
}
<h2>@ViewBag.Title</h2>
<table class="grid">
	<thead>
		<tr>
			<th>Product name</th>
			<th>Category</th>
		</tr>
	</thead>
	<tbody>
		@foreach (var product in Model) { 
			<tr>
				<td>@product.Title</td>
				<td>@product.Category.Name</td>
			</tr>
		}
	</tbody>
</table>
<div class="pager">
    @Html.Pager(Model.PageSize, Model.PageNumber, Model.TotalItemCount)	
</div>
